package com.example.spring.controller;

import com.example.spring.utils.SpringContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import redis.clients.jedis.JedisCluster;

import java.util.UUID;

/**
 * Created by Administrator on 2017-11-16.
 */
public class TestRedis {

    //private static JedisCluster jedisCluster = SpringContextHolder.getBean(JedisCluster.class);

    @Autowired
    JedisCluster jedisCluster;

    public void loadToken(){
        String token = UUID.randomUUID().toString();
        jedisCluster.set("user_"+token,"kakakakakaka");
    }

}
